package com.shujujiegou;

/**
 * Created by buguniao on 16/3/1.
 */
public class Test {
    public static void main(String[] args){
        System.out.println(1 << 3 );
        /*String a ="ABCDE";
        String b ="EAC";

        System.out.println(contains(a,b));*/
    }

    public static boolean contains(String a,String b){
        int hash=0;
        for(int i=0;i<a.length();++i){
            hash |=(1 << (a.charAt(i) - 'A'));
        }
        for(int j=0;j<b.length();++j){
            if((hash & (1 << (b.charAt(j) - 'A')))==0){
                return false;
            }
        }
        return true;
    }
}
